{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "\n",
    "import os \n",
    "\n",
    "\n",
    "from os.path import join, split,exists, isdir,isfile\n",
    "\n",
    "file_root =  join(os.getcwd(),'..')\n",
    "os.chdir(file_root)\n",
    "\n",
    "from utils.pc_utils import *\n",
    "from utils import * \n",
    "\n",
    "\n",
    "from utils.utils import * \n",
    "import numpy as np \n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "from entity.semantic_kitti_gt_loader import SementicKittiGtLoader"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "000000.label\n",
      "000000.bin\n"
     ]
    }
   ],
   "source": [
    "\n",
    "semantic_gt_loader = SementicKittiGtLoader(join(os.getcwd(),'../semantic_kitti/dataset'))\n",
    "label = semantic_gt_loader.get_label(0)\n",
    "pc,remission = semantic_gt_loader.get_velodyne(0)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "000200.label\n",
      "000200.bin\n"
     ]
    }
   ],
   "source": [
    "semantic_gt_loader.save(200)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/data2/liyang/semantic_kitti_api-master/jupyters/../../semantic_kitti/predictions/sequences/08/ng/Open_world_3D_semantic_segmentation/runs/debug_original/model_epoch_30/point_predict/000000.label\n"
     ]
    }
   ],
   "source": [
    "\n",
    "data_root = join(file_root,'..','semantic_kitti')\n",
    "pred_dir = join(data_root,'predictions/sequences/08/ng/Open_world_3D_semantic_segmentation/runs/debug_original/model_epoch_30','point_predict')\n",
    "\n",
    "for l in os.listdir(pred_dir):\n",
    "    print(join(pred_dir,l))\n",
    "    break\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(123389,)"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'000000.label'"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "l"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "yang_real",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.13"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
